package com.demo.service.impl;

import com.demo.dao.IDepDao;
import com.demo.entity.Dep;
import com.demo.service.IDepService;
import com.demo.vo.DepVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepServiceImpl implements IDepService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private IDepDao depDao;

    @Override
    public List<Dep> queryByPage(DepVo arg) {
        return depDao.queryByPage(arg);
    }

    @Override
    public int queryCount(DepVo arg) {
        return depDao.queryCount(arg);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return depDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Dep arg) {
        return depDao.insert(arg);
    }

    @Override
    public int insertSelective(Dep arg) {
        return depDao.insertSelective(arg);
    }

    @Override
    public Dep selectByPrimaryKey(Integer id) {
        return depDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Dep arg) {
        return depDao.updateByPrimaryKeySelective(arg);
    }

    @Override
    public int queryCountByComId(DepVo user) {
        return depDao.queryCountByComId(user);
    }

    @Override
    public Dep queryByDepNameAndComId(Dep dep) {
        return depDao.queryByDepNameAndComId(dep);
    }

}
